import request from '@/utils/request'
import { stringify } from 'qs';

export function login (params) {
  const urlParams = params ? `?${stringify(params)}` : '';
  return request({
    url: `/api/auth/oauth/token${urlParams}`,
    method: 'POST',
    data: params
  })
}

export function getDepartmentById (params) {
  const urlParams = params ? `?${stringify(params)}` : '';
  return request({
    url: `/api/uc/sysDept/getDepartmentById${urlParams}`,
    method: 'GET',
    data: params
  })
}
